<?php


class FileDownloadHistoryTable extends Doctrine_Table
{
    
    public static function getInstance()
    {
        return Doctrine_Core::getTable('FileDownloadHistory');
    }

    static public function setFileDownloadHistory($fileId,$userId,$modification)
    {
        $history = new FileDownloadHistory();
        $history->fileId = $fileId;
        $history->lastDownloadId = $userId;
        if ($modification == 1)
        {
            $history->download_for_changes = 1;
        }
        $history->save();

    }
}